Stop Propagation of Events

This tutorial shows you how to stop the propagation of an event in both capturing and bubbling phases using the Event.stopPropagation() method.

Create a One-Off Event Handler

This tutorial shows you how to use the addEventListener() method to create a one-off event handler that execute only once when the event occurs for the first time.

Remove an Event Handler

This tutorial shows you how to use the removeEventListener() method to remove an event handler from an event of an element.

Add an Event Handler

This tutorial shows you how to attach an event handler to an event of an element in JavaScript.

Trigger an Event

This tutorial shows you how to trigger an event on an element programmatically using JavaScript DOM API.